package src;

import java.util.Calendar;

import static java.util.Calendar.*;

/**
 * Created by dell on 2017/7/25.
 */
public class CalendarTest {
    public static void main(String[] args) {
        Calendar cl= Calendar.getInstance();
        System.out.println(cl.get(YEAR));
        System.out.println(cl.get(MONTH));
        System.out.println(cl.get(DATE));
        cl.set(2003,4,23,6,59,59);
        System.out.println(cl.getTime());
        cl.add(YEAR,-1);
        System.out.println(cl.getTime());
        cl.add(MONTH,8);
        System.out.println(cl.getTime());
    }
}
